// import React from 'react'
// const React = require("react")
// const ReactDom = require('react-dom')
import React from "react"
import ReactDom from "react-dom"

// 创建react元素(虚拟dom)
// React.createElement(标签名, 属性, 子元素)
const oDiv = React.createElement("div", { id: "box" }, ["我是react元素----------"])

// 把react元素给渲染到页面
// ReactDom.render(要渲染的react元素, 挂载点, callback)
ReactDom.render(oDiv, document.getElementById("root"), () => {
    console.log("渲染成功")
})

